package com.example.johnerez.myapplication;

import java.io.Serializable;
import java.util.List;

/**
 * Created by johnerez on 1/6/15.
 */
public class DataTypes {
    public static class Response implements Serializable {
        final List<Restaurant> restaurants;
        final List<String> filters;

        public Response(List<Restaurant> restaurants, List<String> filters) {
            this.restaurants = restaurants;
            this.filters = filters;
        }
    }

    public static class Restaurant implements Serializable {
        final String name;

        final List<Dish> dishes;
        final List<Dish> matchingDishes;

        final String address;
        final String phone;

        final int yelpRating;
        final int yelpNumberOfRaters;

        final double latitude;
        final double longitude;

        final double distanceKm;

        final int healthRating;

        final List<Review> reviews;

        public Restaurant(String name, List<Dish> dishes, List<Dish> matchingDishes, String address,
                          String phone, double latitude, double longitude, double distanceKm, int yelpRating,
                          int yelpNumberOfRaters, int healthRating, List<Review> reviews) {
            this.name = name;

            this.dishes = dishes;
            this.matchingDishes = matchingDishes;

            this.address = address;
            this.phone = phone;

            this.latitude = latitude;
            this.longitude = longitude;

            this.distanceKm = distanceKm;

            this.yelpRating = yelpRating;
            this.yelpNumberOfRaters = yelpNumberOfRaters;

            this.healthRating = healthRating;

            this.reviews = reviews;
        }
    }

    public static class Dish implements Serializable {
        final String name;
        final String description;

        final String imageUrl;

        final double price;

        final List<Review> reviews;

        public Dish(String name, double price, String description, String imageUrl, List<Review> reviews) {
            this.name = name;
            this.price = price;
            this.description = description;
            this.imageUrl = imageUrl;
            this.reviews = reviews;
        }
    }


    public static class Review implements Serializable {
        final String text;
        final int rating;

        public Review(String text, int rating) {

            this.text = text;
            this.rating = rating;
        }
    }
}
